const express=require("express")
const router=express.Router();
const pool=require("../pool");
//功能九：添加购物车
router.get("/",(req,res)=>{
  //1:获取参数
  var did=parseInt(req.query.did) ;    //商品id
  var sql=`SELECT 
            vid,title,
            pic,vide
            FROM video_detail WHERE vid=? `;
  pool.query(sql,[did],(err,result)=>{
    if(err) throw err;
    res.send({code:1,data:result})
  })
})
module.exports=router;